package cn.jbolt.ai.core.chain.config;

import cn.jbolt.util.JSONUtil;
import com.fasterxml.jackson.databind.JsonNode;

/**
 * 根据functioncall结果进行回答配置
 */
public class FuncChatNodeConfig {



    /**
     * funccall结果 来源字段
     */
    private String funcCallResultField ;

    /**
     * 匹配到的function 来源字段
     */
    private String matchFunctionField;

    /**
     * 输出的字段名
     */
    private String outputField;


    public static FuncChatNodeConfig from(JsonNode jsonNode) {
        return JSONUtil.toObject(jsonNode, FuncChatNodeConfig.class);
    }

    public static JsonNode getDefaultConfig() {
        return JSONUtil.toJsonObject(new FuncChatNodeConfig());
    }

    public String getOutputField() {
        return outputField;
    }

    public void setOutputField(String outputField) {
        this.outputField = outputField;
    }

    public String getFuncCallResultField() {
        return funcCallResultField;
    }

    public void setFuncCallResultField(String funcCallResultField) {
        this.funcCallResultField = funcCallResultField;
    }

    public String getMatchFunctionField() {
        return matchFunctionField;
    }

    public void setMatchFunctionField(String matchFunctionField) {
        this.matchFunctionField = matchFunctionField;
    }
}
